import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionServlet; import org.apache.struts.util.MessageResources; import javax.servlet.http.HttpSession; public class SaveMountainAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); MountainForm mForm = (MountainForm)form; try { MountainMgr.Update(mForm.getMountainId(), mForm.getMountainName(), mForm.getLocation(), mForm.getKingId()); }catch(java.sql.SQLException e){ throw new ServletException("SQLException" + e.getMessage()); } return (mapping.findForward("success")); } }